#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 100;
int t;
string s;
int main() {
#ifdef LOCAL
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
#endif
    cin >> t;
    while (t--) {
        cin >> s;
        sort(s.begin(), s.end());
        cout << s << endl;
    }
    return 0;
}